"""
根据错误类型捕获异常
"""


try:
    num = int(input("请输入一个整数："))
    result = 8 / num
    print(result)
except ValueError:
    print("请输入整数")
except ZeroDivisionError:
    print("除数不能为零")
except Exception as result:
    print("未知错误 %s" % result)
